{extend name="admin@public/base_content" /}
{block name="main-content"}
<div class="page-content">
    <div class="row">
        <div class="col-md-12">
            <div class="block">
                <div class="block-content tab-content">
                    <div class="tab-pane active">
                        <div class="block-content">
                            <form class="form-horizontal ajaxForm-noJump" action="{:url('install')}" method="post">
                                <input type="hidden" name="name" value="{$name|default=''}">
                                <div class="form-group">
                                    <h4 class="col-xs-12">模块依赖检查</h4>
                                    <div class="col-sm-12">
                                        {empty name="need_module"}
                                        <div class="form-control-static">无需依赖其他模块</div>
                                        {else/}
                                        <table class="table table-bordered table-striped">
                                            <thead>
                                            <tr>
                                                <th>模块</th>
                                                <th>标识</th>
                                                <th style="width: 100px;">当前版本</th>
                                                <th style="width: 100px;">所需版本</th>
                                                <th class="text-center" style="width: 100px;border-right:#CCC solid 1px;">检查结果</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            {volist name="need_module" id="vo"}
                                            <tr>
                                                <td>{$vo.module}</td>
                                                <td>{$vo.module}</td>
                                                <td>{$vo.version}</td>
                                                <td>{$vo.version_need}</td>
                                                <td class="text-center">
                                                    {$vo.result|raw}
                                                </td>
                                            </tr>
                                            {/volist}
                                            </tbody>
                                        </table>
                                        {/empty}
                                    </div>
                                </div>
                                <div class="form-group">
                                    <h4 class="col-xs-12">插件依赖检查</h4>
                                    <div class="col-sm-12">
                                        {empty name="need_addon"}
                                        <div class="form-control-static">无需依赖其他插件</div>
                                        {else/}
                                        <table class="table table-bordered table-striped">
                                            <thead>
                                            <tr>
                                                <th>插件</th>
                                                <th>标识</th>
                                                <th style="width: 100px;">当前版本</th>
                                                <th style="width: 100px;">所需版本</th>
                                                <th class="text-center" style="width: 100px;border-right:#CCC solid 1px;">检查结果</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            {volist name="need_addon" id="vo"}
                                            <tr>
                                                <td>{$vo.addon}</td>
                                                <td>{$vo.addon}</td>
                                                <td>{$vo.version}</td>
                                                <td>{$vo.version_need}</td>
                                                <td class="text-center">
                                                    {$vo.result|raw}
                                                </td>
                                            </tr>
                                            {/volist}
                                            </tbody>
                                        </table>
                                        {/empty}
                                    </div>
                                </div>
                                <div class="form-group">
                                    <h4 class="col-xs-12 push-10">数据表检查</h4>
                                    <div class="col-sm-12">
                                        {empty name="table_check"}
                                        <div class="form-control-static">该模块不需要数据表</div>
                                        {else/}
                                        <table class="table table-bordered table-striped">
                                            <thead>
                                            <tr>
                                                <th>数据表</th>
                                                <th class="text-center" style="width: 100px;border-right:#CCC solid 1px;">检查结果</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            {volist name="table_check" id="vo"}
                                            <tr>
                                                <td>{$vo.table}</td>
                                                <td class="text-center">
                                                    {$vo.result|raw}
                                                </td>
                                            </tr>
                                            {/volist}
                                            </tbody>
                                        </table>
                                        {/empty}
                                    </div>
                                </div>
                                <div class="form-group " id="form_group_group">
                                    <h4 class="col-xs-12 push-10">是否清除旧数据</h4>
                                    <div class="col-xs-9">
                                        <label class="css-input css-radio css-radio-primary css-radio-sm push-10-r">
                                            <input type="radio" name="clear" id="clear1" value="0" checked="">
                                            <span></span> 否
                                        </label>
                                        <label class="css-input css-radio css-radio-primary css-radio-sm push-10-r">
                                            <input type="radio" name="clear" id="clear2" value="1">
                                            <span></span> 是
                                        </label>
                                        <div class="help-block">
                                            选择“是”，将删除数据库中已存在的相同数据表
                                        </div>
                                    </div>
                                </div>
                                <div class="clearfix form-actions">
                                    <div class="col-xs-offset-3 col-xs-9">
                                        <button class="btn btn-info " type="submit">
                                            <i class="ace-icon fa fa-check bigger-110"></i>安装</button>
                                        <button class="btn " onclick="javascript:history.back(-1);return false;">
                                            <i class="ace-icon fa fa-undo bigger-110"></i>返回</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div><!-- /.page-content -->
{/block}
